package mymodel

// AeParamConfItem ae参数配置
type AeParamConfItem struct {
	AeEet             int  `json:"aeEet"`
	AeHdt             int  `json:"aeHdt"`
	AeHlt             int  `json:"aeHlt"`
	AeThreshold       int  `json:"aeThreshold"`
	AeParaEnable      bool `json:"aeParaEnable"`
	AeSystemTime      int  `json:"aeSystemTime"`
	AeWaveEnable      bool `json:"aeWaveEnable"`
	AeMeasureMode     int  `json:"aeMeasureMode"`
	AeMeasureSpeed    int  `json:"aeMeasureSpeed"`
	AeMeasureState    bool `json:"aeMeasureState"`
	AeMeasureTimes    int  `json:"aeMeasureTimes"`
	AeMeasureLength   int  `json:"aeMeasureLength"`
	AeMeasureInterval int  `json:"aeMeasureInterval"`
}

// AeFirConfItem fir配置
type AeFirConfItem struct {
	FirLow    int `json:"firLow"`
	FirHigh   int `json:"firHigh"`
	FirEnable int `json:"firEnable"`
	FirM2Mode int `json:"firM2Mode"`
}

// AeFFTConfItem ae fft配置
type AeFFTConfItem struct {
	AeFftEnable          uint32               `json:"aeFftEnable"`          //FFT 使能 1是0否
	Extract              uint32               `json:"extract"`              //抽取系数
	AeFFTConfigBandItems []*AeFFTConfBandItem `json:"aeFFTConfigBandItems"` //频段信息
}
type AeFFTConfBandItem struct {
	Index  uint32 `json:"index"`  //频段序号 1-5
	Start  uint32 `json:"start"`  //频段起始
	End    uint32 `json:"end"`    //频段结束
	Enable uint32 `json:"enable"` //频段使能 1 0
}

// AeTimingConfItem ae定时配置
type AeTimingConfItem struct {
	AeTimingType      int                      `json:"aeTimingType"`
	AeTimingSleep     int                      `json:"aeTimingSleep"`
	AeTimingEnable    bool                     `json:"aeTimingEnable"`
	AeTimingLength    int                      `json:"aeTimingLength"`
	AeFixedTimingList []*AeFixedTimingListItem `json:"aeFixedTimingList"`
	Crons             []*AeCronItem            `json:"crons"`
}
type AeCronItem struct {
	Start uint32 `json:"start"` //起始
	End   uint32 `json:"end"`   //结束
	Cron  string `json:"cron"`  //cron表达式
}
type AeFixedTimingListItem struct {
	Range []int `json:"range"`
}

// AeLevelConfItem2 ae评级配置v2
type AeLevelConfItem2 struct {
	Enable          bool               `json:"enable"`
	AeLevelStrength []*AeLevelStrength `json:"aeLevelStrength"`
	AeLevelActivity []*AeLevelActivity `json:"aeLevelActivity"`
	CalTime         int                `json:"calTime"`
	ReportLevel     int                `json:"reportLevel"`
	Interval        int                `json:"interval"`
}
type AeLevelStrength struct {
	Level int            `json:"level"`
	Rules []*AeLevelRule `json:"rules"`
}
type AeLevelRule struct {
	Items []*AeLevelRuleItem `json:"items"`
}
type AeLevelRuleItem struct {
	Prop  string  `json:"prop"`
	Value float32 `json:"value"`
}
type AeLevelActivity struct {
	Level int `json:"level"` //等级 1-9
	Times int `json:"times"` //次数
}

// ViMeasureConfItem 振动采集配置
type ViMeasureConfItem struct {
	ViMeasureType   uint32 `json:"viMeasureType"`   //类型 0单轴 1三轴
	ViMeasureFreq   uint32 `json:"viMeasureFreq"`   //采样频率 1：1KHz,2:2KHz,4:4KHz
	ViMeasureTimes  uint32 `json:"viMeasureTimes"`  //采样次数
	ViMeasurePoints uint32 `json:"viMeasurePoints"` // 采样点数 [1024,2048,4096]
	ViMeasureSleep  uint32 `json:"viMeasureSleep"`
	ViFirLow        uint32 `json:"viFirLow"`  // (Hz)
	ViFirHigh       uint32 `json:"viFirHigh"` // (Hz)
	ViFirAmp        uint32 `json:"viFirAmp"`

	ViOffsetX float32 `json:"viOffsetX"`
	ViOffsetY float32 `json:"viOffsetY"`
	ViOffsetZ float32 `json:"viOffsetZ"`
	ViFactorX float32 `json:"viFactorX"`
	ViFactorY float32 `json:"viFactorY"`
	ViFactorZ float32 `json:"viFactorZ"`

	ViRange             uint32  `json:"viRange"`
	ViWaveEnable        bool    `json:"viWaveEnable"`
	ViMeasureState      bool    `json:"viMeasureState"`
	ViSystemTime        uint32  `json:"viSystemTime"`
	ViConfigVersion     uint32  `json:"viConfigVersion"`
	ViSaveLoop          uint32  `json:"viSaveLoop"`
	ViOffsetTemperature float32 `json:"viOffsetTemperature"`
	ScheduleVersion     uint32  `json:"scheduleVersion"`
	ViRemoveAccX        bool    `json:"viRemoveAccX"` //去除x轴静态加速度值。1去除 0不去除
	ViRemoveAccY        bool    `json:"viRemoveAccY"` //去除y轴静态加速度值。1去除 0不去除
	ViRemoveAccZ        bool    `json:"viRemoveAccZ"` //去除z轴静态加速度值。1去除 0不去除
}

type AeFrpItem struct {
	Enable               bool   `json:"enable"`
	ServerIp             string `json:"serverIp"`
	ServerPort           int32  `json:"serverPort"`
	RemotePort           int32  `json:"remotePort"`
	TcpMux               bool   `json:"tcpMux"`
	TcpMuxConnectTimeout int32  `json:"tcpMuxConnectTimeout"`
	HeartbeatInterval    int32  `json:"heartbeatInterval"`
	HeartbeatTimeout     int32  `json:"heartbeatTimeout"`
}
